from api.views import account, topic, news, collect, recommend, comment
from django.urls import path
from rest_framework import routers

router = routers.SimpleRouter()
# 用户注册
router.register(r'register', account.RegisterView, basename='register')
# 话题
router.register(r'topic', topic.TopicView, basename='topic')
# 资讯
router.register(r'news', news.NewsView, basename='news')
# 首页 资讯
router.register(r'index', news.IndexView, basename='index')
# 收藏
router.register(r'collect', collect.CollectView, basename='collect')
# 推荐
router.register(r'recommend',recommend.RecommendView, basename='recommend')
# 评论
router.register(r'comment',comment.CommentView, basename='comment')

urlpatterns = [
    path('auth/', account.AuthView.as_view(), name='auth')
]

urlpatterns += router.urls
